﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

using ProjectBase.Core;

namespace $safeprojectname$.Services
{
    /// <summary>
    ///     Provides the CodeList of ContentTypes
    ///     for exporting files using http
    /// </summary>
    [Serializable]
    public class ContentType : CodeList
    {
        /// <summary>
        ///     Suffix for file of this content type
        ///     e.g. '.xls', '.doc'
        /// </summary>
        public virtual string Suffix { get; set; }

        public virtual bool IsZip
        {
            get { return Code.IsNotEmpty() && Code.Contains("/zip"); }
        }

        public virtual bool IsImage
        {
            get { return Code.IsNotEmpty() && Code.Contains("image/"); }
        }
    }
}